
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <base href="/">
  <meta charset="utf-8">
  <title>充值中心</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="res/layui/css/layui.css">
  <link rel="stylesheet" href="res/css/global.css">
</head>
<body>

<div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="/">
      <img th:src="${index[0].blogLogo}" alt="layui" width="200" height="40">
    </a>
  </div>
</div>

<div class="layui-container fly-marginTop fly-user-main">
  <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
    <li class="layui-nav-item">
      <a href="/">
        <i class="layui-icon">&#xe609;</i>
        我的主页
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/userindex">
        <i class="layui-icon">&#xe612;</i>
        用户中心
      </a>
    </li>
    <li class="layui-nav-item layui-this">
      <a href="user/userInfo">
        <i class="layui-icon">&#xe620;</i>
        基本设置
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/listUserBlog">
        <i class="layui-icon">&#xe60a;</i>
        文章管理
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/store">
        <i class="layui-icon">&#xe735;</i>
        VIP管理
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/order">
        <i class="layui-icon">&#xe63c;</i>
        订单管理
      </a>
    </li>
  </ul>

  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>
  
  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>


  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li class="layui-this" lay-id="info">充值中心</li>
      </ul>
      <div class="layui-tab-content" style="padding: 20px 0;">
        <form action="pay/confirm" target="_blank">
          <div class="layui-form-pane  layui-tab-item layui-show">
            <div class="layui-form-item">
              <b style="color: red">￥1元 = 2 个飞吻</b>
            </div>
            <div class="layui-form-item">
              <label for="L_username" class="layui-form-label">充值</label>
              <div class="layui-input-inline">
                <input type="text" id="L_username" name="bigDecimal" required  autocomplete="off" placeholder="请输入金额..." class="layui-input">
              </div>
              <div class="layui-input-inline">
                <button class="layui-btn" key="set-mine" type="submit">确定</button>
              </div>
            </div>

          </div>
        </form>
        </div>

      </div>
    </div>

</div>

<footer th:replace="footer::header-fragment"></footer>
<script th:replace="footer::script-fragment"></script>
<script src="res/layui/layui.js"></script>
<script>
  layui.cache.page = 'user';
  layui.cache.user = {
    username: '游客'
    ,uid: -1
    ,avatar: 'res/images/avatar/00.jpg'
    ,experience: 83
    ,sex: '男'
  };
  layui.config({
    version: "3.0.0"
    ,base: 'res/mods/'
  }).extend({
    fly: 'index'
  }).use('fly');
  layui.config({
    base: 'layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'set','layer','upload'],function (){
    var $ = layui.$
            ,form = layui.form
            ,layer = layui.layer
            ,upload = layui.upload;

    //提交
    form.on('submit(submitUser)', function(obj){
      //获取表单参数
      var date = obj.field;
      var sex = date.sex == '男'?1:0;
      //请求接口
      $.post('pay/confirm',{
        "bigDecimal":date.bigDecimal,
      },function (res){
        if (res.success){
          layer.msg('修改个人信息成功', {
            offset: '15px'
            ,icon: 1
            ,time: 1000
          });
        }else {
          layer.msg('修改个人信息失败', {
            offset: '15px'
            ,icon: 1
            ,time: 1000
          });
        }
      },'json');

      return false;
    });
  });
</script>
</body>
</html>